
<template>
    <div class="setting">
        <div class="setting-title">
            <van-icon @click="goBack" size="24" name="arrow-left" />
            <div>个人中心</div>
            <van-icon size="24" name="search" />
        </div>
        <ul>
            <router-link to="address"><li>地址管理</li></router-link>
            <li>经营证照</li>
            <li>协议规则</li>
            <li>隐私管理</li>
            <li>华米商城用户协议</li>
            <li>华米商城隐私政策</li>
            <li>华米账号使用协议</li>
            <li>华米账号隐私政策</li>
        </ul>

        <van-button class="exit" type="primary" @click="exitBtn">退出登录</van-button>
    </div>
</template>
<script setup lang="ts">
import { useUserStore } from '@/stores/total.js'
import { useRouter } from 'vue-router';
const exit = useUserStore()
const router = useRouter()

const exitBtn = ()=>{
    exit.removeToken()
    router.replace({
        name:'login'
    })

}
const goBack = ()=>{
    window.history.back();  
}

</script>
<style scoped>
.setting{
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 9999;
}
   .setting-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: #736666;
    background-color: #f2f2f2;
   }
   .exit{
    position: absolute;
    bottom: 80px;
    left: 150px;
   }
   li{
    color: #3c3c3c;
    margin: 20px 10px;
   }
</style>

